#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 505;

int n, m;
int dp[N][N];
int f(int a, int b) {
  if (dp[a][b] != -1) return dp[a][b];
  unordered_set<int> st;
  rep(i, 2, a - 2) st.insert(f(i, b) ^ f(a - i, b));
  rep(i, 2, b - 2) st.insert(f(a, i) ^ f(a, b - i));
  for (int i = 0;; i++) {
    if (!st.count(i)) return dp[a][b] = dp[b][a] = i;
  }
}
void solve() { cout << (f(n, m) ? "WIN" : "LOSE") << endl; }
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  memset(dp, -1, sizeof(dp));
  while (cin >> n >> m) solve();
  return 0;
}